<template>
	<view class="content bgf8">
		<view class="boxes" v-for="i in list" @click.stop="detail(i.id)">
			<view class="uniFlex2"><text class="title">门诊名称：</text>{{i.title}}</view>
			<view class="uniFlex2"><text class="title">门诊地址：</text>{{i.address}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad(options) {
			let items = JSON.parse(JSON.parse(options.query).companyList)
			this.list = items;
			// console.log(items)
		},
		
		methods: {
			detail(id){
				uni.showModal({
					title: '提示',
					content: '是否前往该门诊？',
					success: function(res) {
						if (res.confirm) {
							uni.clearStorage();
							window.location.href = getApp().globalData.baseUrlImg + '/h5/?companyId='+id
						}
					}	
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background: #f8f8f8;
	}
	.boxes{
		padding: 30upx;
		background: #ffffff;
		margin-bottom: 20upx;
		line-height: 170%;
		font-size: 28upx;
		color: #7B7B7B;
		
		.title{
			flex-shrink: 0;
			color: #000000;
		}
		.text{
			color: #F87F53;
			padding: 5upx 20upx;
			font-size: 30upx;
		}
	}
</style>
